#ifndef _TUNNEL_H_
#define _TUNNEL_H_

#include <stdint.h>


#define TUNL_VERSION            "10"

#define TUNL_REQ_ACTIVE_NO      0
#define TUNL_REQ_ACTIVE_YES     1

#define TUNL_RES_GO             "go"


typedef struct {
    int is_got_req;
    int active;
    int number;
} tunl_t;


int tunl_set_req(char *buf, tunl_t *t);
int tunl_get_req(char *buf, int len, tunl_t *t);
int tunl_set_res(char *buf, tunl_t *t);
int tunl_get_res(char *buf, int len, tunl_t *t);


int tunnel_set_request();
int tunnel_get_request();
int tunnel_set_response();
int tunnel_get_response();

#endif
